package com.alibaba.ai.service.impl;

import com.alibaba.ai.dao.YPostLikeMapper;
import com.alibaba.ai.entity.YPostLike;
import com.alibaba.ai.service.YPostLikeService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
public class YPostLikeServiceImpl implements YPostLikeService {
   @Resource
    private YPostLikeMapper yPostLikeMapper;

    @Transactional
    @Override
    public Boolean addPostLike(YPostLike yPostLike) {
        return yPostLikeMapper.addPostLike(yPostLike)>0;
    }

    @Transactional
    @Override
    public boolean addPostUnLike(YPostLike yPostLike) {
        return yPostLikeMapper.addPostUnLike(yPostLike)>0;
    }


}
